import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/pages/login'
import index from '@/components/pages/index'
import main from '@/components/pages/main'
import me from '@/components/pages/me'
import report from '@/components/pages/report'
//添加
import deviceAdd from '@/components/pages/deviceAdd'
//添加设备
import addDevice from '@/components/pages/addDevice'
//添加网关
import addGateway from '@/components/pages/addGateway'
//设备保养
import deviceKeep from '@/components/pages/deviceKeep'
import addKeep from '@/components/pages/addKeep'
import deviceFault from '@/components/pages/deviceFault'
import device from '@/components/pages/device'
import deviceInfo from '@/components/pages/deviceInfo'
import gateway from '@/components/pages/gateway'
import check from '@/components/pages/check'
import repairDetail from '@/components/pages/repairDetail'
import repair from '@/components/pages/repair'
import toRepair from '@/components/pages/toRepair'
import repairList from '@/components/pages/repairList'
import unfinish from '@/components/pages/unfinish'
import lookScene from '@/components/pages/lookScene'
import maintainUnfinish from '@/components/pages/maintainUnfinish'
import keepRecord from '@/components/pages/keepRecord'
import setCenter from '@/components/pages/setCenter'
import changePwd from '@/components/pages/changePwd'
import repairdeviceList from '@/components/pages/repairdeviceList'
import changeApplication from '@/components/pages/changeApplication'
import addApplication from '@/components/pages/addApplication'
import scane from '@/components/pages/scane'
import addCurMan from '@/components/pages/addCurMan'
import editCurMan from '@/components/pages/editCurMan'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
	  redirect:'/login'
    },
	{
		path:'/login',
		name:'login',
		component:login
	},
		{
			path:'/main',
			name:'main',
			component:main,
			redirect:'/main/index',
			children:[
				{
					path:'index',
					name:'index',
					component:index,
				},
				{path:'me',name:'me',component:me},
				{path:'report',name:'report',component:report},
				{path:'index/deviceKeep/:display',name:'deviceKeep',component:deviceKeep},
				{path:'index/addKeep',name:'addKeep',component:addKeep},
				{path:'index/deviceFault',name:'deviceFault',component:deviceFault},
				{path:'index/device',name:'device',component:device},
				{path:'index/gateway',name:'gateway',component:gateway},
				{path:'index/check',
				name:'check',
				component:check,
				},
				{path:'index/repairDetail/:facilityName',name:'repairDetail',component:repairDetail},
				{path:'index/repair',name:'repair',component:repair},
				{path:'index/toRepair',name:"toRepair",component:toRepair},
				{path:'index/repairList',name:'repairList',component:repairList},
				{path:'index/lookScene',name:'lookScene',component:lookScene},
        {path:'me/setCenter',name:'setCenter',component:setCenter},
        {path:'me/changPwd',name:'changePwd',component:changePwd},
		  {path:'index/repairdeviceList/:isMe',name:'repairdeviceList',component:repairdeviceList},
			{path:'index/addApplication',name:'addApplication',component:addApplication},
			{path:'index/scane/:areaName',name:'scane',component:scane},
      {path:'index/addCurMan',name:"addCurMan",component:addCurMan},
      {path:'index/editCurMan',name:'editCurMan',component:editCurMan},
			]

		},

		{path:'/deviceInfo/:isScan/:id',name:'deviceInfo',component:deviceInfo},
		{path:'/addGateway',name:'addGateway',component:addGateway},
		{path:'/addDevice',name:'addDevice',component:addDevice},
		{path:'/deviceAdd',name:'deviceAdd',component:deviceAdd},
		{path:'/unfinish',name:'unfinish',component:unfinish},
    {path:'/maintainUnfinish',name:'maintainUnfinish',component:maintainUnfinish},
    {path:'/keepRecord/:facilityname',name:'keepRecord',component:keepRecord},
		{path:'/changeApplication',name:'changeApplication',component:changeApplication}
  ]
})
